<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="public/style/public.css" />
<link rel="stylesheet" type="text/css" href="public/style/register.css" />
<script type='text/javascript' src='public/jquery-1.10.1.min.js'></script>
<script type='text/javascript' src='public/layer/layer.js'></script>
<script>

$(function(){

	$('form input[type=button]').click(function(){
		//加载效果
		//layer.load(2, {shade: false});
		$.ajax({
			type:'post',
			url:'register_deal.php',
			data:$('form').serialize(),
			dataType:'json',
			success:function(res){
				//关闭所有层
				//layer.closeAll();
				console.log($('form').serializeArray());
				if(res.status==1){

					layer.msg(res.msg, {icon: 6});
					setTimeout("window.location.href='index.php'",3000);

				}else{

					layer.msg(res.msg, {icon: 5});
					//layer.closeAll();
				}

			}
		});
	});
});


</script>
</head>
<body>
	<div class="header_wrap">
		<div id="header" class="auto">
			<div class="logo">小杰论坛</div>
			<div class="nav">
				<a class="hover" href="index.php">首页</a>
				<a>新帖</a>
				<a>话题</a>
			</div>
			<div class="serarch">
				<form>
					<input class="keyword" type="text" name="keyword" placeholder="搜索其实很简单" />
					<input class="submit" type="submit" name="submit" value="" />
				</form>
			</div>
		</div>
	</div>
	<div style="margin-top:55px;"></div>
	<div id="register" class="auto">
		<h2>欢迎注册成BBS会员</h2>
		<form action="register_deal.php" method="post">
			<label>用户名：<input type="text" name="username" /><span>*用户名含有禁用字符，请选择其他用户名</span></label>
			<label>密码：<input type="password" name="password" /><span>*用户名含有禁用字符，请选择其他用户名</span></label>
			<label>确认密码：<input type="password" name="cpassword" /><span>*用户名含有禁用字符，请选择其他用户名</span></label>
			<label>验证码：<input name="code" type="text"  /><span>*请输入下方验证码</span></label>
			<img class="vcode" src="common/verify.inc.php" onclick="this.src='common/verify.inc.php?'+new Date().getTime();" />

			<div style="clear:both;"></div>
			<input class="btn" type="button" name="submit" value="确定注册" />
		</form>
	</div>
	<div id="footer" class="auto">
		<div class="bottom">
			<a>传智播客</a>
		</div>
		<div class="copyright">Powered by itcast ©2015 itcast.cn</div>
	</div>
</body>
</html>